package com.zyf.cloud.services.userservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zyf.cloud.services.userservice.entity.UserEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 持久层映射接口
 *
 * @author Nocol
 */
public interface UserMapper extends BaseMapper<UserEntity> {

    //注册添加用户
    Boolean addUser2(@Param("cm") UserEntity user);
    //public Integer insertItripUser( @Param("cm") UserEntity user)throws Exception;

    //查询是否存在
    int findUserByLgName(@Param("name") String name );

    //修改密码
    int upUserPassword(UserEntity user);

    //修改用户
    Integer updateItripUser(UserEntity itripUser)throws Exception;
    /*
     * 根据用户名和密码查询用户完成登入
     * 注解的两个参数会自动封装成map集合，括号内即为键
     */
    UserEntity findUserByNameAndPwdv1(@Param("name") String name, @Param("password") String password);

    UserEntity findUserByNameAndPwdv(@Param("name") String name, @Param("password") String password);

    List<UserEntity> getItripUserListByMap(Map<String,Object> param);

}
